cc.Class({
    extends: cc.Component,

    // use this for initialization
    init: function () {
        this.anim = this.getComponent(cc.Animation);
        this.sprite = this.getComponent(cc.Sprite);
    },

    show: function (show) {
        this.sprite.enabled = show;
    },

    playWin: function () { 
        this.sprite.enabled = true;
        this.anim.stop();
        this.anim.play('win');
    },
});